﻿using Application.AppService.CPCAppService;
using Application.AppService.ERAppService;
using AutoMapper;
using Domain;
using Domain.Entity;
using Microsoft.AspNetCore.Mvc;

namespace UI.Controllers.RecruitmentManagement_招聘管理_.resume_management_简历管理_
{
	public class ERSController : Controller
	{
		private readonly IMapper mapper;
		private readonly IERAppService eRAppService;

		public ERSController(IMapper mapper, IERAppService eRAppService)
		{
			this.mapper = mapper;
			this.eRAppService = eRAppService;
		}
		public IActionResult Index()
		{
			return View();
		}
		public IActionResult Index1()
		{
			return View();
		}
		public IActionResult Index2()
		{
			return View();
		}
		[HttpPost("FYERS")]
		public IActionResult FYERS(string HumanMajorKindId, string HumanMajorId, string gzc, DateTime startDate, DateTime endDate, int page, int pageSize)
		{

			ERFenYE erFenYE = eRAppService.DateERAsync(HumanMajorKindId, HumanMajorId, gzc, startDate, endDate, page, pageSize,1);
			return Json(erFenYE);
		}
		[HttpPost("UpdateER")]
		public async Task<IActionResult> UpdateER(ER er)
		{
			bool rs = await eRAppService.UpdateERAsync(er);
			return Json(rs);
		}
	}
}
